﻿namespace Product.Mvc.Models
{
    public class PlanModel
    {
        /// <summary>
        /// 计划编号
        /// </summary>
        public string Plan_Number { get; set; }

        /// <summary>
        /// 计划名称
        /// </summary>
        public string Plan_Name { get; set; }

        /// <summary>
        /// 工单数量
        /// </summary>
        public int Quantity_Orders { get; set; }

        /// <summary>
        /// 来源类型
        /// </summary>
        public string Source_Type { get; set; }

        /// <summary>
        /// 订单编号
        /// </summary>
        public string Order_Number { get; set; }

        /// <summary>
        /// 产品ID
        /// </summary>
        public int Product_Id { get; set; }

        /// <summary>
        /// 计划数量
        /// </summary>
        public int Planned_quantity { get; set; }

        /// <summary>
        /// 计划开工时间
        /// </summary>
        public DateTime Start_Time { get; set; }

        /// <summary>
        /// 计划完工时间
        /// </summary>
        public DateTime Completion_Time { get; set; }

        /// <summary>
        /// 需求日期
        /// </summary>
        public DateTime Requirement_Date { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public int State { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Notes { get; set; }

        // 生产物品列表
        public List<ProductItem> ProductItems { get; set; } = new();
    }

    // 生产物品子模型
    public class ProductItem
    {
        public string? ItemCode { get; set; } // 物品编号
        public string? ItemName { get; set; } // 物品名称
        public string? Model { get; set; }    // 规格型号
        public string? Unit { get; set; }     // 单位
        public string? Category { get; set; } // 物品类别
        public string? Brand { get; set; }    // 品牌
        public int Quantity { get; set; }     // 数量

        public int Id { get; set; }
    }


}
